package com.ytxg.book.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ytxg.api.po.book.BookComment;
import com.ytxg.api.po.book.BookInfo;
import com.ytxg.book.dto.*;
import com.ytxg.core.dto.RestResp;

import java.util.Collection;
import java.util.List;

/**
 * <p>
 * 小说信息 服务类
 * </p>
 *
 * @author YT_XG
 * @since 2023-12-09
 */
public interface IBookInfoService extends IService<BookInfo> {

    RestResp<List<BookChapterRespDto>> listChapters(Long bookId);

    RestResp<BookContentAboutRespDto> getBookContentAbout(Long chapterId);

    RestResp<BookInfoRespDto> getBookById(Long bookId);

    RestResp<List<BookRankRespDto>> getBookOrdByVisit();

    RestResp<List<BookRankRespDto>> getBookRank();

    RestResp<List<BookRankRespDto>> getBookUpdateRank();

    void addVisit(long id);

    RestResp<List<BookInfoRespDto>> getRecList(Long bookId);

    RestResp<BookCommentDto> getNewestList(Long bookId);

    RestResp getBookAbout(Long bookId);

    RestResp getList(Integer workDirection);

    List<BookInfo> getBookByIds(Collection<Long> bookIds);

    RestResp<Long> getChapterId(Long id,Integer mode);

    List<BookComment> getBookComment(Long userId, Integer pageNum,Integer pageSize);
}
